function checkRelatedProviderNetworkAffiliationOnLoad() {

    //https://dvagov-ppms-dev.crm9.dynamics.com/api/data/v8.2/accounts(00AA884C-ABD2-E611-80FA-1458D05087B8)?$select=ppms_affiliationtype_healthnet,ppms_affiliationtype_triwest

    var providerId = Xrm.Page.getAttribute('ppms_providerid').getValue()[0].id

    var orgUrl = window.parent.Xrm.Page.context.getClientUrl();
    var webAPIUrl = "/api/data/v8.2/";
    var requestType = "accounts";
    requestType += "("
    requestType += providerId;
    requestType += ")"
    var options =
        "?$select=ppms_affiliationtype_healthnet, ppms_affiliationtype_triwest";

    var request = new String();

    request += orgUrl + webAPIUrl + requestType + options;

    $.ajax({
        type: "GET",
        contentType: "application/json; charset=utf-8",
        datatype: "json",
        url: request,
        beforeSend: function (XMLHttpRequest) {
            //Specifying this header ensures that the results will be returned as JSON.             
            XMLHttpRequest.setRequestHeader("Accept", "application/json");
        },
        success: function (data, textStatus, xhr) {

            //Check the data values here (affiliationtype)
            //set fields to readonly based on the data type. 



        },
        error: function (e) {
            showErrorMsg(e.statusText);
        }
    });



}
